{% extends "base.html" %}
{% block content %}
<div class="column is-4 is-offset-4">
    <h3 class="title">Register</h3>
    <div class="box">

        {% with messages = get_flashed_messages() %}
            {% if messages %}
                <div class="notification is-danger">
                    {{ messages[0] }}. Go to <a href="{{ url_for('auth.login') }}">login page</a>.
                </div>
            {% endif %}
        {% endwith %}

        <form method="POST" action="/register">
            <div class="field">
                <div class="control">
                    <input class="input is-large" type="email" name="email" placeholder="Email" autofocus="">
                </div>
            </div>

            <div class="field">
                <div class="control">
                    <input class="input is-large" type="text" name="username" placeholder="Name" autofocus="">
                </div>
            </div>

            <div class="field">
                <div class="control">
                    <input class="input is-large" type="password" name="password" placeholder="Password">
                </div>
            </div>

            <div class="field">
                <div class="control">
                    <input class="input is-large" type="text" name="ver" placeholder="Your Verification Code">
                </div>
            </div>

            <button class="button is-block is-info is-large is-fullwidth">Register</button>
        </form>
    </div>
</div>
{% endblock %}